﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ETOrePriceCalc
{
    public class Mineral
    {
        private string _name;
        private double _price;
        private int _stock;

        /// <summary>
        /// creates a new mineral
        /// </summary>
        /// <param name="name">name of the mineral</param>
        public Mineral(string name)
        {
            _name = name;
            _price = 0;
            _stock = 0;
        }

        /// <summary>
        /// name of the mineral
        /// </summary>
        public string Name
        {
            get { return _name; }
        }

        /// <summary>
        /// price of the mineral (should only be set by the api parser)
        /// </summary>
        public double Price
        {
            get { return _price; }
            set { _price = value; }
        }

        public int Stock
        {
            get { return _stock; }
            set { _stock = value; }
        }

        /// <summary>
        /// gets the total value of the stock
        /// </summary>
        /// <returns>returns the value of the stock</returns>
        public double getValue()
        {
            return _price*_stock;
        }
    }
}
